import TextArea from "antd/es/input/TextArea"
import { FC } from "react"

import { SFormItem } from "@/components/common"
import { useLocale } from "@/locales"

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const RemarkTextarea: FC<any> = props => {
	const { labelProps, textareaProps, fieldName = "remark", required = true } = props
	const { formatMessage } = useLocale()
	return (
		<SFormItem
			name={fieldName}
			label={formatMessage({ id: "label.member.remark" })}
			rules={
				required && [
					{
						required: true,
						message: formatMessage({ id: "message.please_inter_sth" }, { sth: formatMessage({ id: "label.remark" }) })
					}
				]
			}
			{...labelProps}
		>
			<TextArea
				count={{
					show: true,
					max: 50
				}}
				{...textareaProps}
			/>
		</SFormItem>
	)
}

export default RemarkTextarea
